var express = require('express');
var router = express.Router();
var db = require('../mysql/db')

//获取药品信息
router.get('/getMedicine', function (req, res, next) {
    let sql = 'SELECT * FROM medicine_info WHERE kind = "药品"';//MedicineInfo
    let str = '';
    db.query(sql, [], results => {
        res.json({
            errno: 0, message: results
        })
    })
});

//获取检查项目信息
router.get('/getProject', function (req, res, next) {
    let sql = 'SELECT * FROM medicine_info WHERE kind = "检查项目"';
    let str = '';
    db.query(sql, [], results => {
        res.json({
            errno: 0, message: results
        })
    })
});
module.exports = router;